home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 38 / Amiga Format CD38 (1999-03-15)(Future Publishing)(GB)(Track 1 of 3)[!][issue 1999-04].iso / -seriously_amiga- / misc / football / user / fixturesleft.rexx < prev    next >
OS/2 REXX Batch file  |  1999-02-03  |  2KB  |  72 lines

  1. /* ***********************************************************************
  2.  
  3.    DISPLAY FIXTURES LEFT PROGRAM FOR FOOTBALL REXX SUITE
  4.   -------------------------------------------------------
  5.                    Copyright  Mark Naughton 1998
  6.  
  7.  
  8. Version    Date     History
  9. --------------------------------------------------------------------------
  10.  1.0       140498   First release.
  11.  
  12. **************************************************************************
  13.  
  14. Procedure
  15. ---------
  16.  
  17. 1. Check files exist. Open Teams.sf datafile. Get league name.
  18. 2. Search for unplayed matches and store.
  19. 3. Print the matches and exit...
  20.  
  21. ************************************************************************** */
  22. PARSE ARG league_stuff
  23.  
  24. version      = 1
  25. input_file   = '.sf'
  26. separator    = '*'
  27. separator2   = '**'
  28. games.       = '???'
  29. mtch         = 0
  30. not_played   = '__   __'
  31.  
  32.  
  33. parse var league_stuff league_file
  34. league_file = "Data/" || league_file
  35.  
  36. if exists(league_file || input_file) = 0  then exit
  37.  
  38. if open(datafile,league_file || input_file,'r') then do
  39.    do while ~eof(datafile)
  40.       line = readln(datafile)
  41.       if pos(separator2,line) > 0 then
  42.          league_title = delstr(line,1,3)
  43.       if pos(not_played,line) > 0 then do
  44.          mtch = mtch + 1
  45.          games.mtch = line
  46.       end
  47.    end
  48.    close(datafile)
  49. end
  50. else do
  51.    say
  52.    say "ERROR :    (FixturesLeft)"
  53.    say
  54.    say "Cannot open '"league_file||input_file"' for reading."
  55.    exit
  56. end
  57.  
  58. say
  59. say center("'"league_title"'",78)
  60. say "-------------------------------------------------------------------------------"
  61. say
  62. say "Fixtures To Be Played : "mtch
  63. say
  64. do i=1 to mtch
  65.    say games.i
  66. end
  67. say
  68. say
  69. say "-------------------------------------------------------------------------------"
  70. say
  71.  
  72. exit